import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd())
  
  return {
    plugins: [vue()],
    base: '/',
    server: {
      historyApiFallback: false,
      middlewareMode: false,
      fs: {
        strict: true
      },
      // 兼容 spa history 路由
      proxy: {},
      watch: {},
      open: true
    }
  }
})